const path = require("path")

const filepath = "C://abc.txt"

console.log(path.dirname(filepath))